package br.edu.ufcg.lsd.wbis.control;

import java.sql.Date;
import java.util.List;

import br.edu.ufcg.lsd.wbis.control.equipment.Computer;
import br.edu.ufcg.lsd.wbis.control.equipment.ComputerType;
import br.edu.ufcg.lsd.wbis.control.equipment.DiscDriver;
import br.edu.ufcg.lsd.wbis.control.equipment.Display;
import br.edu.ufcg.lsd.wbis.control.equipment.Equipment;
import br.edu.ufcg.lsd.wbis.control.equipment.HardDisk;
import br.edu.ufcg.lsd.wbis.control.equipment.Keyboard;
import br.edu.ufcg.lsd.wbis.control.equipment.Memory;
import br.edu.ufcg.lsd.wbis.control.equipment.Mouse;
import br.edu.ufcg.lsd.wbis.control.equipment.NoBreak;
import br.edu.ufcg.lsd.wbis.control.equipment.PowerSource;
import br.edu.ufcg.lsd.wbis.control.equipment.Printer;
import br.edu.ufcg.lsd.wbis.control.equipment.Processor;
import br.edu.ufcg.lsd.wbis.control.equipment.Router;
import br.edu.ufcg.lsd.wbis.control.equipment.RouterType;
import br.edu.ufcg.lsd.wbis.control.equipment.VideoCard;
import br.edu.ufcg.lsd.wbis.control.exception.AuthenticationFailedException;
import br.edu.ufcg.lsd.wbis.control.exception.BusinessValidationException;
import br.edu.ufcg.lsd.wbis.control.exception.DuplicatedIdentifierException;
import br.edu.ufcg.lsd.wbis.control.exception.InvalidComponentInventoryCode;
import br.edu.ufcg.lsd.wbis.control.exception.InvalidComputerInventoryCode;
import br.edu.ufcg.lsd.wbis.control.exception.PermissionDeniedException;
import br.edu.ufcg.lsd.wbis.control.exception.RootUserAlreadyCreatedException;
import br.edu.ufcg.lsd.wbis.control.exception.RootUserCreationCancelledException;
import br.edu.ufcg.lsd.wbis.control.exception.UnknownEntityException;
import br.edu.ufcg.lsd.wbis.control.exception.UserNotAuthorizedException;
import br.edu.ufcg.lsd.wbis.control.user.User;
import br.edu.ufcg.lsd.wbis.control.user.UserLevel;
import br.edu.ufcg.lsd.wbis.control.util.matching.Matcher;

/**
 * 
 * This is the system's facade. It provides clear methods for dealing with the
 * system. All functionalities must be depicted in the system's facade.
 * 
 * @author Renato Miceli
 */
public interface WBISFacade {

	// ///////////////////////
	// User Manager Methods //
	// ///////////////////////

	
	public User addUser(String requesterLogin, String requesterPassword,
			String userLogin, String userPassword, String userName, String email, UserLevel level, boolean authorized)
			throws BusinessValidationException, DuplicatedIdentifierException,
			PermissionDeniedException, AuthenticationFailedException,
			UserNotAuthorizedException;

	/**
	 * 
	 * Adds a new common user to the system.
	 * 
	 * @param login
	 *            the user's login
	 * @param password
	 *            the user's password
	 * @param userName
	 *            the user's name
	 * @param email
	 *            the user's email
	 * @param level
	 *            the user's level
	 * @return The newly-registered user.
	 * @throws BusinessValidationException
	 *             in case any parameter is <code>null</code> or blank
	 * @throws DuplicatedIdentifierException
	 *             if another user with the same login is already registered to
	 *             the system
	 */
	public User addCommonUser(String login, String password, String userName,
			String email) throws BusinessValidationException,
			DuplicatedIdentifierException;

	/**
	 * Removes the user pointed by the given login rom the system.
	 * 
	 * @param loginToRemove
	 *            the user's to remove login
	 * @throws BusinessValidationException
	 * @throws UnknownEntityException
	 */
	public void removeUser(String login, String password, String loginToRemove)
			throws BusinessValidationException, UnknownEntityException,
			AuthenticationFailedException, UserNotAuthorizedException,
			PermissionDeniedException;

	/**
	 * Updates the user pointed by the login with the given fields.
	 * 
	 * @param login
	 *            the user's login
	 * @param newUserName
	 *            the user's new name
	 * @param newEmail
	 *            the user's new email
	 * @param newLevel
	 *            the user's new level
	 * @param authorizationStatus
	 *            this user's new authorization status
	 * @throws BusinessValidationException
	 * @throws UnknownEntityException
	 */
	public void updateUserInfo(String login, String password,
			String loginToUpdate, String newUserName, String newEmail,
			UserLevel newLevel, boolean authorizationStatus)
			throws BusinessValidationException, UnknownEntityException,
			AuthenticationFailedException, UserNotAuthorizedException,
			PermissionDeniedException;

	/**
	 * @param login
	 * @param password
	 * @param loginToUpdate
	 * @param newPassword
	 * @throws BusinessValidationException
	 * @throws UnknownEntityException
	 * @throws AuthenticationFailedException
	 * @throws UserNotAuthorizedException
	 * @throws PermissionDeniedException
	 */
	public void updateUserPassword(String login, String password,
			String loginToUpdate, String newPassword)
			throws BusinessValidationException, UnknownEntityException,
			AuthenticationFailedException, UserNotAuthorizedException,
			PermissionDeniedException;

	/**
	 * 
	 * @param login
	 * @param authorize
	 * @throws UnknownEntityException
	 * @throws UserNotAuthorizedException
	 * @throws AuthenticationFailedException
	 * @throws BusinessValidationException
	 * @throws PermissionDeniedException
	 */
	public void authorizeUser(String myLogin, String myPwd, String lgin,
			boolean authorize) throws UnknownEntityException,
			BusinessValidationException, AuthenticationFailedException,
			UserNotAuthorizedException, PermissionDeniedException;

	/**
	 * Returns the user given by the pointed login.
	 * 
	 * @param login
	 *            the user's login
	 * @return the user given by the pointed login.
	 * @throws BusinessValidationException
	 *             in case the login is either <code>null</code> or blank
	 * @throws UnknownEntityException
	 *             if no user with the given login is registered to the system.
	 */
	public User getUser(String myLogin, String myPwd, String desiredUser)
			throws BusinessValidationException, PermissionDeniedException,
			AuthenticationFailedException, UserNotAuthorizedException,
			UnknownEntityException;

	/**
	 * Authenticates a user to the system -- that is, checks the correctness of
	 * its fields (if it exists and matches the given ones).
	 * 
	 * @param login
	 *            the user to be authenticated
	 * @param passwordHash
	 *            the users password hash
	 * @return the authenticated user
	 * @throws BusinessValidationException
	 * @throws AuthenticationFailedException
	 * @throws UserNotAuthorizedException
	 */
	public User authenticateUser(String login, String passwordHash)
			throws BusinessValidationException, AuthenticationFailedException,
			UserNotAuthorizedException;

	/**
	 * @param login
	 * @param password
	 * @param userMatcher
	 * @return
	 * @throws AuthenticationFailedException
	 * @throws UserNotAuthorizedException
	 * @throws BusinessValidationException
	 * @throws PermissionDeniedException
	 */
	public List<User> searchUsers(String login, String password,
			Matcher<User> userMatcher) throws AuthenticationFailedException,
			UserNotAuthorizedException, BusinessValidationException,
			PermissionDeniedException;

	/**
	 * Returns the list of all users registered to the system.
	 * 
	 * @return the list of all users registered to the system.
	 */
	public List<User> getUsers(String login, String passwordHash)
			throws BusinessValidationException, AuthenticationFailedException,
			UserNotAuthorizedException, PermissionDeniedException;

	/**
	 * Creates a root user (the first user to be created, an administrator),
	 * given its user information. One and only one root user can be created, so
	 * that an exception is thrown if any other root user is to be created. If
	 * no root users are needed, forbidding the root user creation is advised.
	 * 
	 * @param login
	 * @param password
	 * @param userName
	 * @param email
	 * @return
	 * @throws BusinessValidationException
	 * @throws DuplicatedIdentifierException
	 * @throws RootUserCreationCancelledException
	 * @throws RootUserAlreadyCreatedException
	 * 
	 * @see forbidRootUserCreation
	 */
	public User addRootUser(String login, String password, String userName,
			String email) throws BusinessValidationException,
			DuplicatedIdentifierException, RootUserCreationCancelledException,
			RootUserAlreadyCreatedException;

	/**
	 * Forbids the creation of the root user (the first user to be created, an
	 * administrator). This operation is not reversible.
	 * 
	 * @throws RootUserAlreadyCreatedException
	 *             in case the root user has already been created
	 */
	public void forbidRootUserCreation() throws RootUserAlreadyCreatedException;

	/**
	 * Returns the root user status.
	 * 
	 * @return the root user status.
	 */
	public RootUserStatus getRootUserStatus();

	// ////////////////////////////
	// Equipment Manager Methods //
	// ////////////////////////////

	public Router addRouter(String login, String password,
			String inventoryCode, String brand, String serialCode,
			Date acquisitionDate, String model, String localization,
			boolean available, RouterType routerType, String vlan, int ports)
			throws UserNotAuthorizedException, BusinessValidationException,
			DuplicatedIdentifierException, AuthenticationFailedException,
			PermissionDeniedException;

	public Printer addPrinter(String login, String password,
			String inventoryCode, String brand, String serialCode,
			Date acquisitionDate, String model, String localization,
			boolean available, boolean colored)
			throws UserNotAuthorizedException, BusinessValidationException,
			DuplicatedIdentifierException, AuthenticationFailedException,
			PermissionDeniedException;

	public NoBreak addNoBreak(String login, String password,
			String inventoryCode, String brand, String serialCode,
			Date acquisitionDate, String model, String localization,
			boolean available, int capacity) throws UserNotAuthorizedException,
			BusinessValidationException, DuplicatedIdentifierException,
			AuthenticationFailedException, PermissionDeniedException;

	public Computer addComputer(String login, String password,
			String inventoryCode, String brand, String serialCode,
			Date acquisitionDate, String model, String localization,
			boolean alocable, boolean available, ComputerType computerType,
			String ownerLogin, int numProcessors, int numHDs)
			throws UserNotAuthorizedException, BusinessValidationException,
			DuplicatedIdentifierException, AuthenticationFailedException,
			PermissionDeniedException, UnknownEntityException;

	public Processor addProcessor(String login, String password,
			String inventoryCode, String brand, String serialCode,
			Date acquisitionDate, String model, String localization,
			boolean available, String frequency, String l2Cache, int cores)
			throws UserNotAuthorizedException, BusinessValidationException,
			DuplicatedIdentifierException, AuthenticationFailedException,
			PermissionDeniedException;

	public Memory addMemory(String login, String password,
			String inventoryCode, String brand, String serialCode,
			Date acquisitionDate, String model, String localization,
			boolean available, int capacity, int frequency, String bus)
			throws UserNotAuthorizedException, BusinessValidationException,
			DuplicatedIdentifierException, AuthenticationFailedException,
			PermissionDeniedException;

	public VideoCard addVideoCard(String login, String password,
			String inventoryCode, String brand, String serialCode,
			Date acquisitionDate, String model, String localization,
			boolean available, int memory, int frequency, String bus)
			throws UserNotAuthorizedException, BusinessValidationException,
			DuplicatedIdentifierException, AuthenticationFailedException,
			PermissionDeniedException;

	public Keyboard addKeyboard(String login, String password,
			String inventoryCode, String brand, String serialCode,
			Date acquisitionDate, String model, String localization,
			boolean available, String tipo) throws UserNotAuthorizedException,
			BusinessValidationException, DuplicatedIdentifierException,
			AuthenticationFailedException, PermissionDeniedException;

	public Mouse addMouse(String login, String password, String inventoryCode,
			String brand, String serialCode, Date acquisitionDate,
			String model, String localization, boolean available,
			boolean optical) throws UserNotAuthorizedException,
			BusinessValidationException, DuplicatedIdentifierException,
			AuthenticationFailedException, PermissionDeniedException;

	public DiscDriver addDiscDriver(String login, String password,
			String inventoryCode, String brand, String serialCode,
			Date acquisitionDate, String model, String localization,
			boolean alocable, boolean available, boolean external,
			boolean recorder, String mediaTypes)
			throws UserNotAuthorizedException, BusinessValidationException,
			DuplicatedIdentifierException, AuthenticationFailedException,
			PermissionDeniedException;

	public PowerSource addPowerSource(String login, String password,
			String inventoryCode, String brand, String serialCode,
			Date acquisitionDate, String model, String localization,
			boolean available, int power) throws UserNotAuthorizedException,
			BusinessValidationException, DuplicatedIdentifierException,
			AuthenticationFailedException, PermissionDeniedException;

	public Display addDisplay(String login, String password,
			String inventoryCode, String brand, String serialCode,
			Date acquisitionDate, String model, String localization,
			boolean available, boolean datashow, String type, String resolution)
			throws UserNotAuthorizedException, BusinessValidationException,
			DuplicatedIdentifierException, AuthenticationFailedException,
			PermissionDeniedException;

	public HardDisk addHardDisk(String login, String password,
			String inventoryCode, String brand, String serialCode,
			Date acquisitionDate, String model, String localization,
			boolean alocable, boolean available, boolean external,
			String useDescription, int capacity, String bus)
			throws UserNotAuthorizedException, BusinessValidationException,
			DuplicatedIdentifierException, AuthenticationFailedException,
			PermissionDeniedException;

	public Equipment addOtherEquipment(String login, String password,
			String inventoryCode, String brand, String serialCode,
			Date acquisitionDate, String model, String localization,
			boolean alocable, boolean available, String type)
			throws UserNotAuthorizedException, BusinessValidationException,
			DuplicatedIdentifierException, AuthenticationFailedException,
			PermissionDeniedException;

	public void updateRouter(String login, String password,
			String inventoryCode, String brand, String serialCode,
			Date acquisitionDate, String model, String localization,
			boolean available, RouterType routerType, String vlan, int ports)
			throws UserNotAuthorizedException, BusinessValidationException,
			UnknownEntityException, AuthenticationFailedException,
			PermissionDeniedException;

	public void updatePrinter(String login, String password,
			String inventoryCode, String brand, String serialCode,
			Date acquisitionDate, String model, String localization,
			boolean available, boolean colored)
			throws UserNotAuthorizedException, BusinessValidationException,
			UnknownEntityException, AuthenticationFailedException,
			PermissionDeniedException;

	public void updateNoBreak(String login, String password,
			String inventoryCode, String brand, String serialCode,
			Date acquisitionDate, String model, String localization,
			boolean available, int capacity) throws UserNotAuthorizedException,
			BusinessValidationException, UnknownEntityException,
			AuthenticationFailedException, PermissionDeniedException;

	public void updateComputer(String login, String password,
			String inventoryCode, String brand, String serialCode,
			Date acquisitionDate, String model, String localization,
			boolean alocable, boolean available, ComputerType computerType,
			String ownerLogin, int numProcessors, int numHDs)
			throws UserNotAuthorizedException, BusinessValidationException,
			UnknownEntityException, AuthenticationFailedException,
			PermissionDeniedException;

	public void updateProcessor(String login, String password,
			String inventoryCode, String brand, String serialCode,
			Date acquisitionDate, String model, String localization,
			boolean available, String frequency, String l2Cache, int cores)
			throws UserNotAuthorizedException, BusinessValidationException,
			UnknownEntityException, AuthenticationFailedException,
			PermissionDeniedException;

	public void updateMemory(String login, String password,
			String inventoryCode, String brand, String serialCode,
			Date acquisitionDate, String model, String localization,
			boolean available, int capacity, int frequency, String bus)
			throws UserNotAuthorizedException, BusinessValidationException,
			UnknownEntityException, AuthenticationFailedException,
			PermissionDeniedException;

	public void updateVideoCard(String login, String password,
			String inventoryCode, String brand, String serialCode,
			Date acquisitionDate, String model, String localization,
			boolean available, int memory, int frequency, String bus)
			throws UserNotAuthorizedException, BusinessValidationException,
			UnknownEntityException, AuthenticationFailedException,
			PermissionDeniedException;

	public void updateKeyboard(String login, String password,
			String inventoryCode, String brand, String serialCode,
			Date acquisitionDate, String model, String localization,
			boolean available, String tipo) throws UserNotAuthorizedException,
			BusinessValidationException, UnknownEntityException,
			AuthenticationFailedException, PermissionDeniedException;

	public void updateMouse(String login, String password,
			String inventoryCode, String brand, String serialCode,
			Date acquisitionDate, String model, String localization,
			boolean available, boolean optical)
			throws UserNotAuthorizedException, BusinessValidationException,
			UnknownEntityException, AuthenticationFailedException,
			PermissionDeniedException;

	public void updateDiscDriver(String login, String password,
			String inventoryCode, String brand, String serialCode,
			Date acquisitionDate, String model, String localization,
			boolean alocable, boolean available, boolean external,
			boolean recorder, String mediaTypes)
			throws UserNotAuthorizedException, BusinessValidationException,
			UnknownEntityException, AuthenticationFailedException,
			PermissionDeniedException;

	public void updatePowerSource(String login, String password,
			String inventoryCode, String brand, String serialCode,
			Date acquisitionDate, String model, String localization,
			boolean available, int power) throws UserNotAuthorizedException,
			BusinessValidationException, UnknownEntityException,
			AuthenticationFailedException, PermissionDeniedException;

	public void updateDisplay(String login, String password,
			String inventoryCode, String brand, String serialCode,
			Date acquisitionDate, String model, String localization,
			boolean available, boolean datashow, String type, String resolution)
			throws UserNotAuthorizedException, BusinessValidationException,
			UnknownEntityException, AuthenticationFailedException,
			PermissionDeniedException;

	public void updateHardDisk(String login, String password,
			String inventoryCode, String brand, String serialCode,
			Date acquisitionDate, String model, String localization,
			boolean alocable, boolean available, boolean external,
			String useDescription, int capacity, String bus)
			throws UserNotAuthorizedException, BusinessValidationException,
			UnknownEntityException, AuthenticationFailedException,
			PermissionDeniedException;

	public void updateOtherEquipment(String login, String password,
			String inventoryCode, String brand, String serialCode,
			Date acquisitionDate, String model, String localization,
			boolean alocable, boolean available, String type)
			throws UserNotAuthorizedException, BusinessValidationException,
			UnknownEntityException, AuthenticationFailedException,
			PermissionDeniedException;

	public void removeEquipment(String login, String password,
			String inventoryCode) throws UserNotAuthorizedException,
			BusinessValidationException, UnknownEntityException,
			AuthenticationFailedException, PermissionDeniedException;

	/**
	 * 
	 * @param login
	 * @param password
	 * @return
	 */
	public List<Router> getRouters(String login, String password)
			throws UserNotAuthorizedException, BusinessValidationException,
			AuthenticationFailedException, PermissionDeniedException;

	/**
	 * 
	 * @return
	 */
	public List<Printer> getPrinters(String login, String password)
			throws UserNotAuthorizedException, BusinessValidationException,
			AuthenticationFailedException, PermissionDeniedException;

	/**
	 * 
	 * @return
	 */
	public List<NoBreak> getNoBreaks(String login, String password)
			throws UserNotAuthorizedException, BusinessValidationException,
			AuthenticationFailedException, PermissionDeniedException;

	/**
	 * 
	 * @return
	 */
	public List<Computer> getComputers(String login, String password)
			throws UserNotAuthorizedException, BusinessValidationException,
			AuthenticationFailedException, PermissionDeniedException;

	/**
	 * 
	 * @return
	 */
	public List<Mouse> getMouses(String login, String password)
			throws UserNotAuthorizedException, BusinessValidationException,
			AuthenticationFailedException, PermissionDeniedException;

	/**
	 * 
	 * @return
	 */
	public List<Keyboard> getKeyboards(String login, String password)
			throws UserNotAuthorizedException, BusinessValidationException,
			AuthenticationFailedException, PermissionDeniedException;

	/**
	 * 
	 * @return
	 */
	public List<Processor> getProcessors(String login, String password)
			throws UserNotAuthorizedException, BusinessValidationException,
			AuthenticationFailedException, PermissionDeniedException;

	/**
	 * 
	 * @return
	 */
	public List<Memory> getMemories(String login, String password)
			throws UserNotAuthorizedException, BusinessValidationException,
			AuthenticationFailedException, PermissionDeniedException;

	/**
	 * 
	 * @return
	 */
	public List<VideoCard> getVideoCards(String login, String password)
			throws UserNotAuthorizedException, BusinessValidationException,
			AuthenticationFailedException, PermissionDeniedException;

	/**
	 * 
	 * @return
	 */
	public List<DiscDriver> getDiscDrivers(String login, String password)
			throws UserNotAuthorizedException, BusinessValidationException,
			AuthenticationFailedException, PermissionDeniedException;

	/**
	 * 
	 * @return
	 */
	public List<PowerSource> getPowerSources(String login, String password)
			throws UserNotAuthorizedException, BusinessValidationException,
			AuthenticationFailedException, PermissionDeniedException;

	/**
	 * 
	 * @return
	 */
	public List<Display> getDisplays(String login, String password)
			throws UserNotAuthorizedException, BusinessValidationException,
			AuthenticationFailedException, PermissionDeniedException;

	/**
	 * 
	 * @return
	 */
	public List<HardDisk> getHardDisks(String login, String password)
			throws UserNotAuthorizedException, BusinessValidationException,
			AuthenticationFailedException, PermissionDeniedException;

	/**
	 * 
	 * @return
	 */
	public List<Equipment> getOtherEquipments(String login, String password)
			throws UserNotAuthorizedException, BusinessValidationException,
			AuthenticationFailedException, PermissionDeniedException;

	/**
	 * 
	 * @param computerCode
	 * @param componentCode
	 * @throws InvalidComputerInventoryCode
	 * @throws InvalidComponentInventoryCode
	 */
	public void addComponentToComputer(String login, String password,
			String computerCode, String componentCode)
			throws InvalidComputerInventoryCode, InvalidComponentInventoryCode,
			UserNotAuthorizedException, BusinessValidationException,
			AuthenticationFailedException, PermissionDeniedException;

	/**
	 * 
	 * @param computerCode
	 * @param componentCode
	 * @throws InvalidComputerInventoryCode
	 * @throws InvalidComponentInventoryCode
	 */
	public void removeComponentFromComputer(String login, String password,
			String computerCode, String componentCode)
			throws InvalidComputerInventoryCode, InvalidComponentInventoryCode,
			UserNotAuthorizedException, BusinessValidationException,
			AuthenticationFailedException, PermissionDeniedException;

	/**
	 * 
	 * @param computerCode
	 * @param service
	 * @throws InvalidComputerInventoryCode
	 */
	public void addServiceToComputer(String login, String password,
			String computerCode, String service)
			throws InvalidComputerInventoryCode, UserNotAuthorizedException,
			BusinessValidationException, AuthenticationFailedException,
			PermissionDeniedException;

	/**
	 * 
	 * @param computerCode
	 * @param service
	 * @throws InvalidComputerInventoryCode
	 */
	public void removeServiceFromComputer(String login, String password,
			String computerCode, String service)
			throws InvalidComputerInventoryCode, UserNotAuthorizedException,
			BusinessValidationException, AuthenticationFailedException,
			PermissionDeniedException;

	/**
	 * 
	 * @param equipmentCode
	 * @param ipAdress
	 * @throws UnknownEntityException
	 */
	public void addIPAddressToEquipment(String login, String password,
			String equipmentCode, String ipAdress)
			throws UnknownEntityException, UserNotAuthorizedException,
			BusinessValidationException, AuthenticationFailedException,
			PermissionDeniedException;

	/**
	 * 
	 * @param equipmentCode
	 * @param ipAdress
	 * @throws UnknownEntityException
	 */
	public void removeIPAddressFromEquipment(String login, String password,
			String equipmentCode, String ipAdress)
			throws UnknownEntityException, UserNotAuthorizedException,
			BusinessValidationException, AuthenticationFailedException,
			PermissionDeniedException;

	/**
	 * 
	 * @param equipmentCode
	 * @param macAddress
	 * @throws UnknownEntityException
	 */
	public void addMacAddressToEquipment(String login, String password,
			String equipmentCode, String macAddress)
			throws UnknownEntityException, UserNotAuthorizedException,
			BusinessValidationException, AuthenticationFailedException,
			PermissionDeniedException;

	/**
	 * 
	 * @param equipmentCode
	 * @param macAddress
	 * @throws UnknownEntityException
	 */
	public void removeMacAddressFromEquipment(String login, String password,
			String equipmentCode, String macAddress)
			throws UnknownEntityException, UserNotAuthorizedException,
			BusinessValidationException, AuthenticationFailedException,
			PermissionDeniedException;

	/**
	 * 
	 * @param equipmentCode
	 * @param hostname
	 * @throws UnknownEntityException
	 */
	public void addHostNameToEquipment(String login, String password,
			String equipmentCode, String hostname)
			throws UnknownEntityException, UserNotAuthorizedException,
			BusinessValidationException, AuthenticationFailedException,
			PermissionDeniedException;

	/**
	 * 
	 * @param inventoryID
	 * @param hostname
	 * @throws UnknownEntityException
	 */
	public void removeHostNameFromEquipment(String login, String password,
			String inventoryID, String hostname) throws UnknownEntityException,
			UserNotAuthorizedException, BusinessValidationException,
			AuthenticationFailedException, PermissionDeniedException;

	/**
	 * @param login
	 * @param password
	 * @return
	 * @throws UserNotAuthorizedException
	 * @throws BusinessValidationException
	 * @throws AuthenticationFailedException
	 * @throws PermissionDeniedException
	 */
	public List<Equipment> getAllEquipments(String login, String password)
			throws UserNotAuthorizedException, BusinessValidationException,
			AuthenticationFailedException, PermissionDeniedException;

}